from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import ProjectView, DataBoardView
from project.serializers import ProjectModelSerializer
from project.views import ProjectView

# router = DefaultRouter()
# router.register(r'project', ProjectView)

urlpatterns = [
    # 项目相关接口地址
    path(
        "project/", ProjectView.as_view({"get": "list", "post": "add", })
    ),
    path("project/update/", ProjectView.as_view({"post": "update"})),
    path("project/delete/<int:pk>/", ProjectView.as_view({"delete": "delete"})),
    path("project/<int:pk>/", ProjectView.as_view({"get": "single"})),
    path("project/page/", ProjectView.as_view({"get": "page"})),
    path("project/dataBoard/", DataBoardView.as_view({"get": "data_board_by_project"})),

]
